From: Keir Fraser Date: Thu, 14 Jan 2010 09:40:55 +0000 (+0000) Subject: libxenlight: initialize enum to 1, to prevent defaulting to the 0 X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~12744 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=413759628352c6e821eefddc4369654f23ca38dc;p=xen.git libxenlight: initialize enum to 1, to prevent defaulting to the 0 values when structure when not properly initialized by the client. Signed-off-by: Vincent Hanquez --- diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 529dbd6de2..25a66d9bf8 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -104,7 +104,7 @@ typedef struct { } libxl_domain_suspend_info; typedef enum { - XENFV, + XENFV = 1, XENPV, } libxl_qemu_machine_type; @@ -169,7 +169,7 @@ typedef struct { } libxl_device_console; typedef enum { - PHYSTYPE_QCOW, + PHYSTYPE_QCOW = 1, PHYSTYPE_QCOW2, PHYSTYPE_VHD, PHYSTYPE_AIO, @@ -189,7 +189,7 @@ typedef struct { } libxl_device_disk; typedef enum { - NICTYPE_IOEMU, + NICTYPE_IOEMU = 1, NICTYPE_VIF, } libxl_nic_type; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 7664e592f7..11698bc04e 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -59,7 +59,7 @@ void xl_log(struct libxl_ctx *ctx, int errnoval, int loglevel, const char *file, typedef enum { - DEVICE_VIF, + DEVICE_VIF = 1, DEVICE_VBD, DEVICE_TAP, DEVICE_PCI,